# Contributor: Celeste <cielesti@protonmail.com>
# Maintainer: Celeste <cielesti@protonmail.com>
pkgname=py3-pickle-secure
pkgver=0.99.9
pkgrel=1
pkgdesc="Easily create encrypted pickle files"
url="https://pypi.org/project/pickle-secure/"
arch="noarch"
license="LGPL-3.0-or-later"
depends="py3-cryptography"
makedepends="py3-gpep517 py3-poetry-core"
checkdepends="py3-pytest-cov"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/spapanik/pickle-secure/archive/refs/tags/v$pkgver.tar.gz"
builddir="$srcdir/pickle-secure-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m pytest
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
b4594d50def34c0470b547dacb71d445227183e5cd78ac28aced37cc0b1007296988d82aefe4265b06adf61f0a57d29dd008a1517216034aa84b4eed5a10236f  py3-pickle-secure-0.99.9.tar.gz
"
